<template>
    <Icon
        v-if="iconInfo.iconType === iconTypeMap.libraryIcon"
        :icon="iconInfo.iconName"
        class="text-#606266 w-100% h-100%"
    />
    <SvgIcon
        v-else-if="iconInfo.iconType === iconTypeMap.localSvgIcon"
        :name="iconInfo.iconName"
        class="w-100% h-100%"
    />
    <template v-else></template>
</template>

<script setup>
import { computed } from 'vue'
import { iconTypeMap, splitFullIconName } from '../utils/typeIcon'
import { Icon } from '@iconify/vue'
import SvgIcon from './SvgIcon.vue'

const props = defineProps({
    fullIconName: {
        type: String,
        default: ''
    }
})

const iconInfo = computed(() => {
    return splitFullIconName(props.fullIconName)
})
</script>

<style lang="scss" scoped></style>